﻿CREATE FUNCTION [dbo].[CurrentUserID]()
RETURNS INT
AS
BEGIN
	declare @UserID int
	set @UserID = null
	select @UserID = UserID from master..tblSalesManagerUser where [system_user] = SYSTEM_USER
	RETURN @UserID
END